<style type="text/css">
.robot p {margin:0}
body,html,#mainpage,#sendbox{width: 100%;height: 100%;background: #fafafa;}
.robot .con{position: relative;width: 100%;height: 100%;}
.robot .con .con-head{position: absolute;width: 100%;left: 0;top: 0;height: 78px;background:#F4F7F9;border-bottom:#DBDBDB solid 0.025rem;z-index: 9999; }
.robot .con .con-head .clear-btn{position: absolute; width: 64px;height: 64px;text-align: center;line-height: 64px; border: 0.025rem solid #00a3f0; border-radius: 0.075rem;font-size: 0.4rem;color: #00a3f0;right: 0.3rem;top: 1.35rem;cursor: pointer;}
.robot .con .head-l{float: left;width: 48px;height: 48px;border-radius: 1rem; margin:10px 0 0 10px;}
.robot .con .head-r{float: left;margin-left: 18px;}
.robot .con .head-r .p1{color: #333;font-size:0.7rem;padding:1.28rem 0 0.4rem;  }
.robot .con .head-r .p2{color: #999;font-size:0.6rem;white-space: nowrap; text-overflow: ellipsis;overflow: hidden; }
#sendbox {-webkit-box-orient: vertical;-webkit-flex-direction: column;-moz-flex-direction: column;-ms-flex-direction: column;-o-flex-direction: column;flex-direction: column;}
#sendbox .chat-main{-webkit-box-flex: 1;-moz-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;width: 100%;font-size: 0.58rem;overflow-x: hidden;-webkit-overflow-scrolling: touch;display: block;}
#sendbox .chat-main .chatlog(padding: 0.2rem;width:100%)
#sendbox .talk-box{overflow: hidden;}
#sendbox .talk-wrap{-webkit-box-flex: 1;-moz-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;width: 100%;font-size: 0.28rem;overflow-x: hidden;overflow: auto; -webkit-overflow-scrolling: touch;background: #eee;}
#sendbox .l,#sendbox .r{margin:0.3rem; width:100%}
#sendbox .r .pic{float: right;width: 1.8rem;height: 1.8rem;border-radius: 100%; margin-left:0.3rem;margin-right: 1.3rem;background: url('{{pagedata.avatar || '../addons/jy_guanjia/resource/userlogo.jpg'}}') no-repeat;background-size: 100% 100%;}
#sendbox .l .pic{float: left;width: 1.8rem;height: 1.8rem;border-radius: 0.2rem; margin-left:0.65rem;margin-right: 0.65rem;background: url('{{pagedata.avatar || '../core/resource/images/noavatar.gif'}}') no-repeat;background-size: 100% 100%;}
#sendbox .text{text-align: left;line-height: 1rem; padding: 0.4rem;font-size:0.65rem;background: #F5F5F7;border-radius: 0.6rem;color: #333;width:10.25rem;  }
#sendbox .r .text{float: right;background: #fff;color: #333;margin-left: 0; font-size:0.65rem;border: #EBEBEB solid 1px;}
#sendbox .l .text{float: left;background: #fff;margin-left:0;font-size:0.65rem}
#sendbox .textimg{text-align: left;line-height: 0.7rem; font-size:0.7rem;border-radius: 0.2rem;color: #333;width: auto;max-width:5rem;  }
#sendbox .r .textimg{float: right;color: #fff;margin-left: 0; }
#sendbox .l .textimg{float: left;margin-left:0}
#sendbox .logtime{text-align:center;font-size: 0.58rem;width:6.6rem;margin: 0.6rem auto 0;color: #999;border-radius: 0.1rem;}
#sendbox .loadmore{font-size:0.28rem;color:#999;text-align:center;height:1.2rem;line-height:1.2rem;}
#chat-foot{height: 2.5rem;background: #F5F5F7;width: 100%;border-top: #EBEBEB solid 1px;padding: 0.5rem 0.2rem;}
#chat-foot span {line-height:1.3rem;font-size:1.4rem;}
#chat-foot .inp{background: #F5F5F7;float: left; display: block;width:80%; margin:2px;color: #333;text-indent: 0.5rem;}
#chat-foot input{border:none;border-bottom: 1px solid #EBEBEB;}
#chat-foot .sub-btn{width:2.5rem;text-align:center;float: right;background: #00a3f0;color: #fff;border-radius: 0.2rem;margin:0 0.1rem 0.2rem 0}
#chat-foot .showaudio{width:80%;border: 1px solid #EBEBEB;border-radius: 0.1rem;text-align:center;margin-left:0.2rem;padding:0.2rem 2rem}
.chat-audio {position: fixed;z-index: 12;left: 30%;width:40%;top: 30%;font-size: 0.32rem;color: #fff;background: #000;opacity: 0.7;border-radius: 0.15rem;text-align:center;padding:0.2rem;}
.chat-audio .recording{font-size:1.6rem;height:0.7rem;}
.unread {width: 10px; height: 10px;color: red;border-radius: 50%;display: block;float: left;}
.kefu-playon img{width:0.8rem;height:0.65rem}
/* 小屏幕 */
.geechat-mainrap{position: absolute;width: 100%;height: 100%;left: 0;top: 0;background-color: rgba(0,0,0,0.5);z-index: 99999;}
.geet-con{position: absolute;width: 8rem;height: 1.6rem;bottom:2rem;left: 4rem;}
.shengbo{
	background: url(../core/resource/images/audioplaying.gif) no-repeat
}
.fui-header:after {
	border-bottom: 0px solid #D9D9D9;
}
.icon {
    font-size: 1rem;
}
.coltype{width:48px;margin:0 0.4rem;padding:0 0.3rem;font-size:0.6rem}
</style>
<div class="fui-page order-list-page">
			<div class="fui-navbar-top">
				<div class="fui-cell-group fui-cell-click" style="margin-top:0">
					<div class="fui-cell">
						<div class="fui-cell-text" style="font-size:16px;width:5.5rem">
							<div class="fui-cell-info text bold" style="line-height:0.8rem;font-size:0.8rem;color:#333">发布任务</div>
							<div class="subtitle" style="font-size:0.5rem;margin-top:0.3rem">{{pagedata.title ||'深圳小周邻城'}}</div>
						</div>
						<div class="fui-cell-remark noremark"><i class="icon icon-icon-test"></i></div>
					</div>
				</div>
			</div>
			<div id="sendbox" class="flex" style="padding-top:3rem">
				<div class="chat-main flex" id="svposttext">
						<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
						<div class="chatlog">
						</div>
				</div>
				<div class="fui-cell-group" style="margin:0.5rem 1rem 2.5rem 0.5rem;border-radius: 0.6rem;">
					<div class="fui-icon-group noborder  col-5">
						<div ng-click="pagedata.uporder(1);" class="fui-icon-col coltype">
							<div class="icon-border">
								<i class="icon icon-camera"></i>
							</div>
							<div class="title">拍照</div>
						</div>
						<div ng-click="pagedata.uporder(2);" class="fui-icon-col coltype">
							<div class="icon-border">
								<i class="icon icon-tuwenwenzhen" style="color:#0066CC"></i>
							</div>
							<div class="title">送水</div>
						</div>
						<div ng-click="pagedata.uporder(3);"class="fui-icon-col coltype">
							<div class="icon-border">
								<i class="icon icon-jishu" style="color:#CC3300"></i>
							</div>
							<div class="title">维修</div>
						</div>
						<div ng-click="pagedata.uporder(4);" class="fui-icon-col coltype">
							<div class="icon-border">
								<i class="icon icon-langman" style="color:#FF9933"></i>
							</div>
							<div class="title">帮忙</div>
						</div>
						<div ng-click="pagedata.tel()"  class="fui-icon-col coltype">
							<div class="icon-border">
								<i class="icon icon-phone" style="color:#33CC66"></i>
							</div>
							<div class="title">呼叫 </div>
						</div>
					</div>
					<div class="fui-header searchtop" style="height:1.6rem;margin:0.6rem;background:#fff;position:relative">
						<!--<div class="fui-header-left">
							<i class="icon icon-seeraudio"></i>
						</div>-->
						<div class="title">
							<div class="searchbar searchbar-active" style="margin-right:3rem">
								<div class="search-input">
									<input type="text" style="border-radius:1.2rem;background-color:#b4b4b4" ng-model="pagedata.post.content" placeholder="需要更多帮助，找管家...">
								</div>
							</div>
						</div>
						<div class="fui-header-right" style="padding-right:1.2rem;line-height:1.6rem;height:1.6rem">
							<span class="sub-btn" ng-click="pagedata.orderubmit(4)" style="font-size:0.65rem">发送</span>
						</div>
					</div>
				</div>
				<div id="uporder" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
					<div class="modal-dialog" style="bottom:0;width:100%;left:0">
						<div class="modal-content" style="background:#fff">
							<div class="fui-cell-group fui-cell-click" style="margin-top:0">
								<div class="fui-cell">
									<div class="fui-cell-info bold" style="font-size:1.2rem;color:#333">{{pagedata.type[pagedata.post.type] || '帮助'}}</div>
								</div>
							</div>
							<div class="weui_cells weui_cells_form">
								<div class="weui_cell">
									<div class="weui_cell_bd weui_cell_primary">
										<textarea ng-model="pagedata.post.content" class="weui_textarea" placeholder="请输入问题描述，以便我们更好的处理！" rows="2"></textarea>
										<div class="weui_textarea_counter"><span>0</span>/200</div>
									</div>
								</div>
							</div>
							<div class="weui_cells weui_cells_form" ng-if="pagedata.post.type == 1 || pagedata.post.type == 3">
									<div class="weui_cell">
										<div class="weui_cell_bd weui_cell_primary">
											<div class="weui_uploader">
												<div class="weui_uploader_bd">
													<ul class="weui_uploader_files">
														<li ng-repeat="p in pagedata.post.images track by $index" class="weui_uploader_file" style="background-image:url('{{tomedia(p)}}')">
															<div class="upbtn" >
																<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index-1,0,p);pagedata.post.images.splice($index+1,1)">上移</a>
																<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index,1)">删除</a>
															</div>
														</li>
													</ul>
													<div class="weui_uploader_input_wrp" href="javascript:;" ng-click="images(pagedata.post,'images')">
													</div>
												</div>
											</div>
										</div>
									</div>
							</div>
							<div class="weui_cells weui_cells_form">
								
								<div class="weui_cell" ng-if="pagedata.post.type == 3 || pagedata.post.type == 2">
									<div class="weui_cell_hd"><label for="" class="weui_label">希望上门时段</label></div>
									<div class="weui_cell_bd weui_cell_primary">
										<input class="weui_input" type="datetime-local" id="date" value="pagedata.post.fuwutime" ng-model="pagedata.post.fuwutime" placeholder="">
									</div>
								</div>
							</div>
							<div class="modal-footer">
								<div class="mod-check" ng-click="pagedata.orderubmit()" aria-hidden="true" data-dismiss="modal">确认</div>
							</div>
						</div>
					</div>
				</div>
			</div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script type="text/javascript">
scope.pagedata.tel=function(){
	window.location.href = 'tel:' + scope.pagedata.managermobile;
}
scope.loading = true;  //状态标记
$('#svposttext').animate({scrollTop:100000},300);
scope.pagedata.uporder=function(type){
	if(type){
		scope.pagedata.post.type=type;
	}
	$('#uporder').modal();
}
scope.pagedata.orderubmit=function(type){
	scope.pagedata.post.fuwutime=$("#date").val();
	if(type){
		scope.pagedata.post.type=type;
	}
	if(!scope.pagedata.post.content){
		scope.message('问题描述不能为空！','error');
		return false;
	}
	scope.post_json('jy_guanjia/index/orderubmit/',scope.pagedata.post,function(res){
	
	});
}
var page = 1;
scope.pagedata.getlist = function(type){
		if(type==1){
			page = 1;
			scope.pagedata.list =[];
		}else{
			
		}
		var params = {
					'plugin':'jy_guanjia',
					'action':'index',
					'op':'list',
					'query':'page='+page,
					'data':{},
					'callback':function(data){
							console.log(data);
							if(data.error !=1){
								$('.chatlog').prepend(data.html);
								if(page >1){
									$("#svposttext").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								scope.$evalAsync();
							}else{
								scope.message(data.msg,'error');
							}
					}
		}
		scope.post_json(params);
}
scope.pagedata.getlist(1);
scope.pagedata.scroll_bottom=function(){
	scope.pagedata.getlist();
}
scope.pagedata.upimage=function(){
	scope.up_file(pagedata.post,'image','image')
	scope.pagedata.post.type=1;
	scope.post_json('orderubmit',scope.pagedata.post);
}
</script>
